/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-05-09 11:02:48
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-07-01 11:36:05
 * @FilePath: \ken147258.topayClient\src\api\other\order.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */


import request from "@/utils/request";
import { AxiosPromise } from "axios";

const URL = {
  list: '/platformApi/merchant/list',
  add: '/platformApi/merchant/add',
  stat: '/platformApi/merchant/stat',
  amount_stat: '/platformApi/merchant/amount/stat',
  all: '/platformApi/merchant/all',
  amountList: '/platformApi/merchant/amount/list',
  secret_key_reset: '/platformApi/merchant/secret_key/reset',
  pro_modify: '/platformApi/merchant/pro/modify',
  pro_list: '/platformApi/merchant/pro/list',
  edit: '/platformApi/merchant/edit',
  delete: '/platformApi/merchant/delete',
  amount_change: '/platformApi/merchant/amount/change',
  login_clear: '/platformApi/merchant/login/clear', // 清除登录（清除登录失败信息）
  google_clear: '/platformApi/merchant/google/clear',  // 清除绑定google验证
  tg_bind: '/platformApi/merchant/tg/bind',  // 绑定TG
  tg_clear: '/platformApi/merchant/tg/clear',  // 解绑TG
  tg_clear_all: '/platformApi/merchant/tg/clear_all',  // 一键解绑码商TG
};

export function list(data: object): AxiosPromise<any> {
  return request({
    url: URL.list,
    method: "get",
    params: data,
  });
}

export function stat(data: object): AxiosPromise<any> {
  return request({
    url: URL.stat,
    method: "get",
    params: data,
  });
}

export function amount_stat(data: object): AxiosPromise<any> {
  return request({
    url: URL.amount_stat,
    method: "get",
    params: data,
  });
}

export function all(data?: object): AxiosPromise<any> {
  return request({
    url: URL.all,
    method: "get",
    params: data,
  });
}

export function amountList(data: object): AxiosPromise<any> {
  return request({
    url: URL.amountList,
    method: "get",
    params: data,
  });
}

export function add(data: object): AxiosPromise<any> {
  return request({
    url: URL.add,
    method: "post",
    data: data,
  });
}

export function secret_key_reset(data: object): AxiosPromise<any> {
  return request({
    url: URL.secret_key_reset,
    method: "post",
    data: data,
  });
}

export function pro_modify(data: object): AxiosPromise<any> {
  return request({
    url: URL.pro_modify,
    method: "post",
    data: data,
  });
}

export function amount_change(data: object): AxiosPromise<any> {
  return request({
    url: URL.amount_change,
    method: "post",
    data: data,
  });
}

export function pro_list(data: object): AxiosPromise<any> {
  return request({
    url: URL.pro_list,
    method: "get",
    params: data,
  });
}

export function edit(data: object): AxiosPromise<any> {
  return request({
    url: URL.edit,
    method: "post",
    data: data,
  });
}

export function del(data: object): AxiosPromise<any> {
  return request({
    url: URL.delete,
    method: "get",
    params: data,
  });
}

export function login_clear(data: object) {
  return request({
    url: URL.login_clear,
    method: "post",
    data: data,
  })
}

export function google_clear(data: object) {
  return request({
    url: URL.google_clear,
    method: "post",
    data: data,
  })
}

export function tg_bind(data: object) {
  return request({
    url: URL.tg_bind,
    method: "post",
    data: data,
  })
}

export function tg_clear(data: object) {
  return request({
    url: URL.tg_clear,
    method: "post",
    data: data,
  })
}

export function tg_clear_all(data: object) {
  return request({
    url: URL.tg_clear_all,
    method: "post",
    data: data,
  })
}
